﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="Js/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script language=javascript>
    <!--
        function postStatus() {
            //var postXml = "<root><content>test</content></root>";
            var postXml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
            postXml += "<root><content id=\"2393053602\" fav_official=\"1\" fav_activity=\"1\" value=\"" + "嘿，@技术改变世界 ，&#xD;愿意跟我一起开启一段美好旅程吗？" + "\" /></root>";
            var uri = 'GateService.aspx?op=2&ram=' + new Date().toLocaleString();
            alert(uri);
//            var req = new ajaxRequest(url);
//            //req.dataType = 'xml';
//            req.async = false;
//            req.post(status, function (resp) {
//                alert(resp);
            //            });
            alert(postXml);
            $.ajax({
                url: uri,
                type: 'post',
                async: true,
                processData: false,
                contentType: 'text/xml',
                data: postXml,
                success: function (r) {
                    alert(r);
                },
                dataType: 'json'
            });
        }
    //-->
    </script>
</head>
<body>
    <input type=button value="PostStatus" onclick="javascript:postStatus();" />
</body>
</html>
